Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send fastn.app mountpoints to .wasm modules via x-fastn-app-mounts header #2059

Merged
merged 4 commits into from
Jan 30, 2025

Conversation

siddhantk232
Copy link
Contributor

The header value is a json object that contains the mountpoints of fastn.apps

If in FASTN.ftd, we have:

-- import: fastn
-- fastn.package: hello-world

-- fastn.app: Auth App
package: lets-auth.fifthtry.site
mount-point: /-/auth/

-- fastn.app: Let's Talk App
package: lets-talk.fifthtry.site
mount-point: /talk/

Then the value will be a json string:

{ "lets-auth": "/-/auth/", "lets-talk": "/talk/" }

NOTE: lets-auth.fifthtry.site and lets-talk.fifthtry.site are required to be a system
package. The names lets-auth and lets-talk are taken from their system field.

A check is also added that restricts any package from getting mounted more than once. Mounted apps also have to be a system package.

…unts`

The header value is a json object that contains the mountpoints of `fastn.app`s

If in FASTN.ftd, we have:

```ftd
-- import: fastn
-- fastn.package: hello-world

-- fastn.app: Auth App
package: lets-auth.fifthtry.site
mount-point: /-/auth/

-- fastn.app: Let's Talk App
package: lets-talk.fifthtry.site
mount-point: /talk/
```

Then the value will be a json string:

```json
{ "lets-auth": "/-/auth/", "lets-talk": "/talk/" }
```

NOTE: `lets-auth.fifthtry.site` and `lets-talk.fifthtry.site` are required to be a system
package. The names `lets-auth` and `lets-talk` are taken from their `system` field
@amitu amitu merged commit a2430a2 into main Jan 30, 2025
1 check passed
@amitu amitu deleted the feat/app-mounts-header branch January 30, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants